import {post} from  '../../http'
import store from '@/store'

//添加
export const addVehicleModel=({
  trkNo,
  trkDriverUuid,
  trkConductor,
  trkType,
  trkOwner,
  trkGrossmass,
  trkTonnage,
  trkColorcode,
  trkUsercharacter,
  trkVin,
  trkIssuingorg,
  trkRegisterdate,
  trkIssuedate,
  trkEnergytype,
  trkAxlenumber,
  trkRtcn,
  trkEnginenumber,
  trkTvpn,
  trkVlflag,
  trkVlflagg,

  trkRemark
})=>{
  return post('/FTKJWLHYPT/transoprt/addVehicleModel',{
    Data: {
      Parameters: {
        FTKJWLHYPT: {
          trkNo,
          trkDriverUuid,
          trkConductor,
          trkType,
          trkOwner,
          trkGrossmass,
          trkTonnage,
          trkColorcode,
          trkUsercharacter,
          trkVin,
          trkIssuingorg,
          trkRegisterdate,
          trkIssuedate,
          trkEnergytype,
          trkAxlenumber,
          trkRtcn,
          trkEnginenumber,
          trkTvpn,
          trkVlflag,
          trkVlflagg,

          trkRemark,
          creator:store.state.user.USR_CODE_DX_H,
          fltUuid: store.state.user.FLT_UUID_DX_H,
        }
      }
    }
  })
}

//查询
export const getVehicleModelListA=({
  trkNo,
  trkType,
  status,
  // trkOwner,
  PageSizes,
  PageIndexs
})=>{
  return post('/FTKJWLHYPT/transoprt/getVehicleModelList',{
    Data: {
      Parameters: {
        FTKJWLHYPT: {
          trkNo,
          trkType,
          status,
          // trkOwner,
          fltUuid: store.state.user.FLT_UUID_DX_H,
        }
      },
      Orderbys: {},
      PageIndex: {
        FTKJWLHYPT: PageIndexs
      },
      PageSize: {
        FTKJWLHYPT: PageSizes
      }
    }
  })
}

//编辑
export const editVehicleModel=({
  uuid,
  trkNo,
  trkDriverUuid,
  trkConductor,
  trkType,
  trkOwner,
  trkGrossmass,
  trkTonnage,
  trkColorcode,
  trkUsercharacter,
  trkVin,
  trkIssuingorg,
  trkRegisterdate,
  trkIssuedate,
  trkEnergytype,
  trkAxlenumber,
  trkRtcn,
  trkEnginenumber,
  trkTvpn,
  trkVlflag,
  trkVlflagg,

  version,
  trkRemark
})=>{
  return post('/FTKJWLHYPT/transoprt/editVehicleModel',{
    Data: {
      Parameters: {
        FTKJWLHYPT: {
          uuid,
          trkNo,
          trkDriverUuid,
          trkConductor,
          trkType,
          trkOwner,
          trkGrossmass,
          trkTonnage,
          trkColorcode,
          trkUsercharacter,
          trkVin,
          trkIssuingorg,
          trkRegisterdate,
          trkIssuedate,
          trkEnergytype,
          trkAxlenumber,
          trkRtcn,
          trkEnginenumber,
          trkTvpn,
          trkVlflag,
          trkVlflagg,

          version,
          trkRemark,
          lastmodifier:store.state.user.USR_CODE_DX_H,
          fltUuid: store.state.user.FLT_UUID_DX_H,
        }
      }
    }
  })
}

//删除
export const delVehicleModel=({uuid})=>{
  return post('/FTKJWLHYPT/transoprt/delVehicleModel',{
    Data: {
      Parameters: {
        FTKJWLHYPT: {
          uuid,
          fltUuid: store.state.user.FLT_UUID_DX_H,
        }
      }
    }
  })
}

//审核
export const auditCarMethodA=({
  uuid,
  status
})=>{
  return post('/FTKJWLHYPT/transoprt/auditCar',{
    Data: {
      Parameters: {
        FTKJWLHYPT: {
          uuid,
          status,
          fltUuid: store.state.user.FLT_UUID_DX_H,
        }
      }
    }
  })
}
